package best.driver.android.View;

import android.content.Context;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.webkit.WebSettings;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import best.driver.android.R;
import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;

public class PriceLabelView extends FrameLayout {

    private Context mContext;

    @InjectView(R.id.tv_price_pre)
    TextView mTvPricePre;

    @InjectView(R.id.tv_price_tail)
    TextView mTvPriceTail;

    public PriceLabelView(Context context) {
        this(context, null);
        mContext = context;
    }

    public PriceLabelView(Context context, AttributeSet attrs) {
        super(context, attrs);
        mContext = context;
        View view = LayoutInflater.from(context).inflate(R.layout.price_label_view, this, true);
        ButterKnife.inject(this, view);

    }

    public void setMoney(String price, int color, int textSize) {

        mTvPriceTail.setText(price);
        mTvPriceTail.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize);
        mTvPriceTail.setTextColor(mContext.getResources().getColor(color));
    }

    public void setName(String name, int color, int textSize) {

        mTvPricePre.setText(name);
        mTvPricePre.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize);
        mTvPricePre.setTextColor(mContext.getResources().getColor(color));
    }


}
